<include file="Inc/html_header" />
<div>
	<form name="addpage" method="post" action="<?php echo U('group/group_edit');?>" onsubmit="return checkGroup();">
    	<input type="hidden" name="group_id" value="<?php echo $detail['group_id'];?>" />
		<table class="table table-bordered table-hover">
            <thead>
                <tr>
                    <th colspan="2">修改分组</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td width="100" class="tdf">所属分组：</td>
                    <td class="mySelect"><?php echo $groupSelect;?></td>
                </tr>
                <tr>
                    <td width="100" class="tdf">分组名称：</td>
                    <td><input class="form-control form-focus input_text" type="text" id="group_name" name="group_name" size="40" value="<?php echo $detail['group_name'];?>" /><span></span></td>
                </tr>
                <tr>
                    <td class="tdf" valign="top">分组权限：</td>
                    <td><?php echo $nodesCheckbox; ?></td>
                </tr>
                <tr>
                    <td class="tdf">&nbsp;</td>
                    <td>
                        <input type="checkbox" id="cka" onclick="checkAll(this, 'auth[]')" />全选&nbsp;&nbsp;&nbsp;
                        <input type="submit" value="修改" class="btn btn-primary" />
                        <input type="button" value="返回" class="btn" onclick="backStep();" />
                    </td>
                </tr>
            </tbody>
		</table>
	</form>
</div>
<script type="text/javascript">
$(function(){
    $(document).on('click', '.cb', function(){
        var flag = false;
        if($(this).is(':checked')){ flag = true; }
        var cbs = $(this).parent().find('input[type="checkbox"]');
        for(var i in cbs){ cbs[i].checked = flag; }
    });
});
//检查分组表单
function checkGroup()
{
    var obj_group_name = $('#group_name');
    if($.trim(obj_group_name.val())==''){
        obj_group_name.css('background-color','#ffc');
        obj_group_name.next('span').html('<font color=red> 分组名称不能为空1</font>');
        obj_group_name.focus();
        return false;
    }else{
        obj_group_name.css('background-color','#fff');
        obj_group_name.next('span').html('');
    }
    return true;
}
</script>
<include file="Inc/html_footer" />